//主页地址
var serviceIP="http://localhost:5555";
var wsIP="ws://localhost:5555";
//认证状态监测
var storage=window.localStorage;
var token=storage.getItem("token");
var refreshtoken=storage.getItem("refreshtoken");
//检查夜间模式
var pattern=storage.getItem("nightType");

/* $(function(){
	if(pattern=='true'){
		$("body").attr("class","theme-dark");
	}
}); */
window.onload=function(){
	if(pattern=='true'){
		document.getElementsByTagName("body")[0].className="theme-dark";
	}
}
/* 拦截跳转登录页面 */
$.ajaxSetup({
        statusCode: {
            401:function(data){
				setTimeout(function() {
					console.log(data.responseJSON.data)
					location.href="login.html";
				}, 1000);
            }
        }
   })
